package calculatorSim;

public class Addition {
	//instance variables
	private int add;
	private int num1;
	private int num2;
	
	//constructor
	public Addition(int x, int y){
		System.out.println("Calculate " + x + " and " + y);
		this.num1 = x;
		this.num2 = y;
		this.add = 0;
	}
	//add the numbers
	public int addNums(){
		this.add = this.num1 + this.num2;
		return this.add;
	}
	//display results
	public void showResults(){
		System.out.println("The sum is: " + addNums());
	}


}
